<?php
include 'db.php';
@$userLoginName=$_REQUEST['loginName'];
@$userLogonName=$_REQUEST['logonName'];
@$adminLoginName=$_REQUEST['adminLoginName'];
@$adminLogonName=$_REQUEST['adminLogonName'];
if(!empty($userLoginName)){
	$c1 = select('select * from user where userName=:name',array('name'=>$userLoginName));
	if(empty($c1)){
		echo 'false';
	}else{
		echo 'true';
	}
}
if(!empty($userLogonName)){
	$c2 = select('select * from user where userName=:name',array('name'=>$userLogonName));
	if(empty($c2)){
		echo 'true';
	}else{
		echo 'false';
	}
}
if(!empty($adminLoginName)){
	$adminLonin = select('select * from admin where name=:name',array('name'=>$adminLoginName));
	if(empty($adminLonin)){
		echo 'false';
	}else{
		echo 'true';
	}
}
if(!empty($adminLogonName)){
	$adminLogon = select('select * from admin where name=:name',array('name'=>$adminLogonName));
	if(empty($adminLogon)){
		echo 'true';
	}else{
		echo 'false';
	}
}
